package com.qding.park.common.core.exceptions.business;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.qding.park.common.core.exceptions.BaseException;
import com.qding.park.common.core.exceptions.ExceptionMessage;
import com.qding.park.common.core.exceptions.system.NetWorkException;

public class ServiceException extends BaseException {
	
	private static final Log _log = LogFactory.getLog(NetWorkException.class);
	
	/**
	 * @Field @serialVersionUID : TODO(这里用一句话描述这个类的作用)
	 */
	private static final long serialVersionUID = 1L;
	
	
	private ExceptionMessage exceptionMessage;
	
	
	public void handle() {
		_log.error("ServiceException Context::"+this.exceptionMessage);
		super.handle();
	}

	public ServiceException(ExceptionMessage exceptionMessage, Exception ex) {
		super(null, ex);
		this.exceptionMessage=exceptionMessage;
	}
	
	
	public ServiceException(String id,Exception ex,ExceptionMessage exceptionMessage ) {
		super(id,ex,null);
		this.exceptionMessage=exceptionMessage;
	}


	public ExceptionMessage getExceptionMessage() {
		return exceptionMessage;
	}


	public void setExceptionMessage(ExceptionMessage exceptionMessage) {
		this.exceptionMessage = exceptionMessage;
	}
	
	
	
	
}
